package com.job.yangshida.homework0709;

/**
 * @author 杨士达
 * @version 1.0
 * @since 2022-07-11 11:05:13
 */
public class Number {
   // static int n = 6;
    //static int[][] arr = new int[n][n];
    //arr[0][0]=1;

    public static void main(String[] args) {
        int[][] arr=new int[6][6];
        //行
        arr[0][0]=1;
        for (int row=1;row<=5;row++){
            //列
            arr[row][0]=1;
            arr[row][row]=1;
            for (int col=1;col<row;col++){
                arr[row][col]=arr[row-1][col-1]+arr[row-1][col];
            }
        }
        for (int row=0;row<6;row++){
            for (int col=0;col<6;col++){
                System.out.print(arr[row][col]+"\t");
            }
            System.out.println();
        }

   /* public void in(int n){
        int[][] arr=new int[n][n];
        //行
        arr[0][0]=1;
        for (int row=1;row<=6;row++){
            //列
            arr[row][0]=1;
            arr[row][row]=1;
            for (int col=1;col<row;col++){
                arr[row][col]=arr[row-1][col-1]+arr[row-1][col];
            }
        }
    }
   /* public static void  in(int col, int row) {
        if (row > 2) {
            in(col - 1, row - 1);
        } else {
            arr[row][col] = arr[row - 1][col - 1] + arr[row - 1][col];
        }
    }*/
}}